package com.example.util.model;

public enum GwBusiProtocol {
    CASTDEFINDFILE(1, "扫描已存在的文件", "castDefindFileImpl"),
    CASTUNDEFINDFILE(2, "根据号段生成文件扫描", "castUnDefindFileImpl"),
    DOINGFILE(3, "扫描文件组装手机号", "assertMobileImpl");

    private Integer code;
    private String des;
    private String className;


    GwBusiProtocol(Integer code, String des, String className) {
        this.code = code;
        this.des = des;
        this.className = className;
    }

    public Integer getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

    public String getClassName() {
        return className;
    }

    public static GwBusiProtocol getGwBusiProtocolByCode(Integer code) {
        if (code == null) {
            return null;
        }
        GwBusiProtocol[] values = GwBusiProtocol.values();
        for (GwBusiProtocol value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
